package com.smedi.ismedi.progress.core.port.adapter.persistence.mybatis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.ProgressReport;
import com.smedi.ismedi.progress.core.domain.aggregatemodel.WeekMonthReportType;
import com.smedi.ismedi.progress.core.port.adapter.persistence.model.ProgressReportDetailEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 特种设备信息表Mapper
 *
 * @author xienannan
 * @date 2021/08/28
 */
@Mapper
public interface ProgressReportDetailMapper extends BaseMapper<ProgressReportDetailEntity> {

    void updateDetail(List<ProgressReportDetailEntity> progressReportDetailNew);

    void deleteOther(List<ProgressReportDetailEntity> progressReportDetailList);

    Integer findPercentageNum(ProgressReport weekReport);

    String startWorkTime(WeekMonthReportType weekMonthReportType);

    String type(WeekMonthReportType weekMonthReportType);

    List<Map<String, Object>> milestoneAndKeyLagging7(ProgressReport weekReport);

    void insertBatch(@Param("progressReportDetailEntitys") List<ProgressReportDetailEntity> progressReportDetailEntitys);

    void updateDetailNew(ProgressReportDetailEntity progressReportDetail);
}